/**
 * Created by dungnt13 on 11/26/14.
 */
$(function () {
    'use strict';
    $('#autocomplete-singer').devbridgeAutocomplete({
        serviceUrl: '/hocdans/singer/suggestion-singer',
        paramName: 'name',
        dataType: 'json',
        type: 'GET',

        onSelect: function (suggestion) {
            $('#singer-id').val(suggestion.data);
        }
    });

    $('#autocomplete-musician').devbridgeAutocomplete({
        serviceUrl: '/hocdans/singer/suggestion-musician',
        paramName: 'name',
        dataType: 'json',
        type: 'GET',
        onSelect: function (suggestion) {
            $('#musician-id').val(suggestion.data);
        }
    });
});
